import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
import 'package:getwidget/getwidget.dart';
import 'package:meal/constant/sizes.dart';
import 'package:meal/utils/colors.dart';
import 'package:meal/utils/styles.dart';
import 'package:meal/utils/tools.dart';

class NoticeAdd extends StatefulWidget {
  const NoticeAdd({Key? key}) : super(key: key);

  @override
  State<NoticeAdd> createState() => _NoticeAddState();
}

class _NoticeAddState extends State<NoticeAdd> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: ToolsUtils.getDefaultBackgroundColor(),
      appBar: ToolsUtils.getDefaultBrnAppBar('店铺公告'),
      body: SingleChildScrollView(
        padding: const EdgeInsets.symmetric(horizontal: Sizes.default15),
        child: Column(
          children: [
            Container(
              height: Sizes.default50,
              alignment: Alignment.centerLeft,
              child: Text(
                '中文公告',
                style: StylesUtils.customTextStyle(
                    color: ColorsUtils.color797, fontSize: Sizes.default15),
              ),
            ),
            Container(
              padding: const EdgeInsets.all(Sizes.default10),
              constraints: const BoxConstraints(minHeight: 150),
              decoration: const BoxDecoration(
                  color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(5))),
              child: BrnInputText(
                maxLength: 400,
                minLines: 5,
                onTextChange: (String content) {},
                hint: '请输入公告内容',
              ),
            ),
            Container(
              alignment: Alignment.center,
              margin: const EdgeInsets.only(top: Sizes.default30),
              child: FractionallySizedBox(
                widthFactor: 0.9,
                child: GFButton(
                    onPressed: () {

                    },
                    text: '确定',
                    textStyle: StylesUtils.customTextStyle(fontSize: Sizes.default16),
                    shape: GFButtonShape.pills,
                    type: GFButtonType.solid,
                    size: GFSize.LARGE,
                    color: ColorsUtils.parseColorFromHexString(ColorsUtils.colorFf6)),
              ),
            )
          ],
        ),
      ),
    );
  }
}
